using System.Collections.Generic;
using Abp.AutoMapper;
using DM.Roles.Dto;
using DM.Tests.Dtos;

namespace DM.Web.Models.Test
{
    [AutoMapFrom(typeof(TestEditDto))]
    public class CreateOrEditTestModel : TestEditDto
    {
        public bool IsEditMode{
            get { return Id.HasValue; }
        }

        public CreateOrEditTestModel(TestEditDto testEditDto)
        {
            testEditDto.MapTo(this);//把传入的dto值映射到当前对象中
        }
    }
}
